﻿// --------------------------------------------------------------------------------------------------------------------
// <copyright file="Customer.cs" company="Spenta Consulting">
//   (c) Copyright 2011
// </copyright>
// <summary>
//   Extends the customer class with the required metadata
// </summary>
// --------------------------------------------------------------------------------------------------------------------

namespace Spenta.StreetCare.Core.Models
{
    using System.ComponentModel.DataAnnotations;
    using Attributes;

    using Spenta.StreetCare.Core.Shared.Attributes;

    /// <summary>
    /// Extends the customer class with the required metadata
    /// </summary>
    [MetadataType(typeof(CustomerMetadata))]
    public partial class Customer
    {
        /// <summary>
        /// Metadata for Status class
        /// </summary>
        public class CustomerMetadata
        {
            /// <summary>
            /// Gets or sets the customer name.
            /// </summary>
            /// <value>
            /// The customer name.
            /// </value>
            [LocalizedRequired(null)]
            [LocalizedStringLength(255)]
            [LocalizedDisplayName("CustomerNameField")]
            public string CustomerName { get; set; }

            /// <summary>
            /// Gets or sets the customer logo URL.
            /// </summary>
            /// <value>
            /// The customer logo URL.
            /// </value>
            [LocalizedRequired(null)]
            [LocalizedStringLength(1000)]
            [LocalizedDisplayName("CustomerLogoUrlField")]
            public string CustomerLogoUrl { get; set; }

            /// <summary>
            /// Gets or sets the customer hostname.
            /// </summary>
            /// <value>
            /// The customer hostname.
            /// </value>
            [LocalizedStringLength(255)]
            [LocalizedDisplayName("CustomerHostnameField")]
            public string CustomerHostname { get; set; }

            /// <summary>
            /// Gets or sets the customer map credentials.
            /// </summary>
            /// <value>
            /// The customer map credentials.
            /// </value>
            [LocalizedStringLength(255)]
            [LocalizedDisplayName("CustomerMapCredentialsField")]
            public string CustomerMapCredentials { get; set; }

            /// <summary>
            /// Gets or sets the customer latitude.
            /// </summary>
            /// <value>
            /// The customer latitude.
            /// </value>
            [LocalizedRange(-90, 90)]
            [LocalizedDisplayName("CustomerLatitudeField")]
            public double CustomerLatitude { get; set; }

            /// <summary>
            /// Gets or sets the customer longitude.
            /// </summary>
            /// <value>
            /// The customer longitude.
            /// </value>
            [LocalizedRange(-180, 180)]
            [LocalizedDisplayName("CustomerLongitudeField")]
            public double CustomerLongitude { get; set; }

            /// <summary>
            /// Gets or sets the customer zoom.
            /// </summary>
            /// <value>
            /// The customer zoom.
            /// </value>
            [LocalizedRange(1, 21)]
            [LocalizedDisplayName("CustomerZoomField")]
            public int CustomerZoom { get; set; }
        }
    }
}
